import os
import os.path as osp
import re
import shutil

BASEDIR = osp.dirname(osp.abspath(__file__))

# rootdir = osp.abspath(r'/data1/DATA4REID/Market-1501_train_sep_camid')
# rootdir = osp.abspath(r'/data1/DATA4REID/DukeMTMC_train_sep_camid')
# rootdir = osp.abspath(r'/data1/DATA4REID/Market-1501_query_sep_camid')
rootdir = osp.abspath(r'/data1/DATA4REID/DukeMTMC_query_sep_camid')
total=0
for root, dirs, files in os.walk(rootdir):
    # print(root)
    for f in files:
        if f.split('.')[-1] in ['jpg','bmp','png','tif','jpeg']:
            total+=1

print(total)
